package com.gopay.common.user.manager;

import java.io.Serializable;
import java.util.List;

import com.gopay.common.base.manager.BaseManager;
import com.gopay.common.domain.cust.CustCorpInfo;

/**
 * CustCorpInfoQuery Manager
 * 
 * @CustCorpInfoQueryManager.java
 * @author liuxin
 * @2013-1-6 下午2:00:35 www.gopay.com.cn Inc.All rights reserved.
 */
public interface CustCorpInfoQueryManager extends BaseManager<CustCorpInfo, Serializable> {

    /**
     * 修改商户信息
     * @param custId
     * @param websiteUrl
     * @param websiteName
     * @param identityCode
     * @param websiteDesc
     */
    public void updateMerchantInfo(String custId,String websiteUrl,String websiteName,String identityCode,String websiteDesc);
    
    
    public CustCorpInfo getByEmail(String email);
    
    /**
     * 获取开通的用户
     * @param email
     * @return
     */
    public List<CustCorpInfo> getCustCorpOpen(String email);
    
    /**
     * 根据手机号获取信息
     * @param mobile
     * @return
     */
    public CustCorpInfo getByMobile(String mobile);
    
    /**
     * 证件号是否重复
     * @param certType
     * @param certNo
     * @return
     */
    public int getByCertTypeAndCertNo(String certType, String certNo) ;

    /**
     * 获取最新未激活的企业客户
     * @param email
     * @return
     */
    public CustCorpInfo getNoActiveCustByCustEmail(String email);
    /**
     * 获取最新未激活的企业客户
     * @param mobile
     * @return
     */
    public CustCorpInfo getNoActiveCustByCustMob(String mobile);
    /**
     * 根据用户ID获取信息
     * @param mobile
     * @return
     */
    public CustCorpInfo getByCustId(String custId);
    /**
     * 获取所有状态的企业客户
     * @param MobileNo
     * @return
     */
	public CustCorpInfo getByMobileNo(String MobileNo);

    
    /**
     * 根据corpName获取所有企业客户信息
     * 
     * @param corpName
     * @return
     */
    public List<CustCorpInfo> getCorpByCorpName(String corpName);
    

	
	public List<CustCorpInfo> getByEmailAndCustStat(String email,String[] custStat);


    /**
     * @param email
     * @return
     * @Desc 根据email、custName、certType查询企业信息
     * @Date 2016/11/30 11:34 by xuexj
     */
    CustCorpInfo findByEmail(String email,String custName,String certType);

    /**
     * @param mob
     * @return
     * @Desc 根据mob、custName、certType查询企业信息
     * @Date 2016/11/30 11:35 by xuexj
     */
    CustCorpInfo findByMobile(String mob,String custName,String certType);



    /**
     * 只根据邮箱查询企业客户信息
     * @param email 企业邮箱
     * @return {@link CustCorpInfo}企业客户信息
     */
    CustCorpInfo getByEmailWithoutStat(String email);



    /**
     * 
     * 如何密码是sha1(长度=40),设置支付密码为sha512
     * @param sbNewPayPwd
     * @param custCorpInfo 
     * @author hougn
     */
    void setCorpNewPayPwd(StringBuilder sbNewPayPwd, CustCorpInfo custCorpInfo);



	/**
	 * 判断是否是航空商户
	 * @param custId
	 * @return
	 */
	boolean isAirlineMerchant(String custId);

	/**
	 * 按照商户Id和平台唯一ID查询信息
	 * @param merId
	 * @param merCustId
	 * @return
	 */
	CustCorpInfo findByMerCustId(String merId, String merCustId);

}
